from app import db


class Student(db.Model):
    __tablename__ = 'tbl_student'
    Stu_id = db.Column(db.String(10), primary_key=True)
    Stu_log_id = db.Column(db.String(10), nullable=False)
    Stu_name = db.Column(db.String(50), nullable=False)

    def to_json(self):
        return {
            "Stu_id": self.Stu_id,
            "Stu_log_id": self.Stu_log_id,
            "Stu_name": self.Stu_name,
        }
